:root {
  --main-text-color: #212121;
  --secondary-text-color: #757575;
  --white-text: #ffffff;
  --white-bg: #ffffff;
  --acent-color: #2196f3;
  --team-bg-color: #f5f4fa;
  --footer-bg-color: #2f303a;
  --footer-text-color: rgba(255, 255, 255, 0.6);
  --hero-bg-color: #2f303a;
  --black-logo-color: #000000;
  --filter-btn-color: #f5f4fa;
  --icon-bg-color: #f5f4fa;
  --icon-color: #afb1b8;
}

/* section {
	outline: 3px dotted red;
} */

body {
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.03em;
  color: var(--main-text-color);
  background-color: var(--white-bg);
}

/* убираем подчеркивание у всех ссылок */
.link {
  text-decoration: none;
}

/* убираем точки у всех елементов списка */
.list {
  list-style-type: none;
}

/* глобальне скидання стилів для елементів <h1>...<h6>, <p> і <ul>.
*/
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

.section {
  padding-top: 94px;
  padding-bottom: 94px;
}

.container {
  /* outline: 2px solid blue; */
  width: 1200px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}

/* ШАПКА */

header {
  border-bottom: 1px solid #ececec;
}

.navigation-flex {
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.19;
  color: var(--acent-color);
}

.black-logo {
  color: var(--black-logo-color);
}

.header-nav-list {
  display: flex;
  margin-left: 93px;
}

.header-nav-item {
  margin-right: 50px;
}

.header-nav-item:last-child {
  margin-right: 0;
}

.header-nav-link {
  display: block;
  padding-top: 32px;
  padding-bottom: 32px;

  font-weight: 500;
  font-size: 14px;
  line-height: 1.14;
  letter-spacing: 0.02em;
  color: var(--main-text-color);
}

.header-contact-item + .header-contact-item {
  margin-left: 50px;
}

.header-contact-list {
  display: flex;
  margin-left: auto;
}

.header-contac-link {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.14;
  letter-spacing: 0.02em;
  color: var(--secondary-text-color);
}

.header-contact-item {
  color: var(--secondary-text-color);
}

.contact-icon {
  fill: currentColor;
  margin-right: 10px;
}

.header-nav-link:hover,
.header-contac-link:hover,
.header-nav-link:focus,
.header-contac-link:focus {
  color: var(--acent-color);
}

.header-nav-link.current {
  color: var(--acent-color);
}

/* ОСНОВНОЙ КОНТЕНТ */
.hero {
  max-width: 1600px;
  min-height: 600px;
  margin-left: auto;
  margin-right: auto;

  padding-top: 200px;
  padding-bottom: 200px;

  text-align: center;

  background-image: linear-gradient(
      rgba(47, 48, 58, 0.4),
      rgba(47, 48, 58, 0.4)
    ),
    url(../images/hero.jpg);
  background-color: var(--hero-bg-color);
}

.hero-title {
  width: 696px;
  margin-right: auto;
  margin-bottom: 30px;
  margin-left: auto;

  font-weight: 900;
  font-size: 44px;
  line-height: 1.36;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-text);
}

.hero-btn {
  padding: 10px 32px;
  background-color: var(--acent-color);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.88;
  align-items: center;
  text-align: center;
  letter-spacing: 0.06em;
  color: var(--white-text);
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.hero-btn:hover,
.hero-btn:focus {
  background-color: #188ce8;
}

/* ОСОБЛИВОСТІ */
.features-list {
  display: flex;
}

.features-item {
  margin-right: 30px;
}

.features-item:last-child {
  margin-right: 0;
}

.features-icon {
  padding: 25px 102px;
  margin-bottom: 30px;
  background-color: var(--icon-bg-color);
  border-radius: 4px;
}

.features-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.71;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.features-desc {
  font-size: 14px;
  line-height: 1.71;
  color: var(--secondary-text-color);
  min-width: 270px;
}

.work {
  padding-top: 0;
}

.work-list {
  display: flex;
  justify-content: space-between;
}

.section-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.16;
  text-align: center;
  margin-bottom: 50px;
}

.team {
  background-color: var(--team-bg-color);
}

.team-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card {
  padding-bottom: 30px;

  background-color: #fff;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 0px 0px 4px 4px;
}

.team-photo {
  margin-bottom: 30px;
}

.team-worker {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.18;
  text-align: center;
  margin-bottom: 10px;
}

.team-position {
  font-size: 16px;
  line-height: 1.18;
  text-align: center;
  color: var(--secondary-text-color);
  margin-bottom: 16px;
}

.socialmedia-list {
  display: flex;
  justify-content: space-between;
  padding: 0 32px;
}

.socialmedia-item {
  width: 44px;
  height: 44px;
}

.socialmedia {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 44px;
  height: 44px;

  border-radius: 50%;
  color: #afb1b8;
}

.socialmedia:hover,
.socialmedia:focus {
  color: var(--white-text);
  background-color: var(--acent-color);
}

.socialmedia-icon {
  /* Другий спосіб розташув. іконки по центру
  margin: 12px 0 0 12px; */

  fill: currentColor;
}

/* КЛИЕНТЫ */
.client-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 32px;

  color: var(--icon-color);
  border: 1px solid #afb1b8;
  border-radius: 4px;
}

.client-link:hover,
.client-link:focus {
  color: var(--acent-color);
  border: 1px solid var(--acent-color);
}

.client-icon {
  fill: currentColor;
}

/* ФУТЕР */

.footer {
  background-color: var(--footer-bg-color);
  padding-top: 60px;
  padding-bottom: 60px;
}

.footer-flex {
  display: flex;
}

.footer-info {
  margin-right: 70px;
}

.footer-contact {
  margin-top: 20px;

  font-size: 14px;
  line-height: 1.71;
  color: var(--white-text);
  font-style: normal;
}

.footer-contac-link {
  font-size: 14px;
  line-height: 1.71;
  color: var(--footer-text-color);
  padding-top: 9px;
}

.footer-contac-link:hover,
.footer-contac-link:focus {
  color: var(--acent-color);
}

.join {
  padding-top: 12px;
}

.join-title {
  padding-bottom: 20px;

  font-weight: 700;
  font-size: 14px;
  line-height: 1.14;
  text-transform: uppercase;

  color: var(--white-text);
}

.join-list {
  display: flex;
  width: 206px;
  justify-content: space-between;
}

.join-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;

  border-radius: 50%;

  color: var(--white-text);
  background-color: rgba(255, 255, 255, 0.1);
}

.join-link:hover,
.join-link:focus {
  background-color: var(--acent-color);
}

.join-icon {
  fill: currentColor;
}

/* --------- */
/* ПОРТФОЛИО */
/* --------- */

.filter-list {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
}

.filter-item {
  margin-right: 8px;
}

.filter-item:last-child {
  margin-right: 0;
}

.filter-btn {
  background-color: var(--filter-btn-color);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.62;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 6px 22px;
}

.filter-btn:hover,
.filter-btn:focus {
  background-color: #188ce8;
  color: var(--white-text);
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08),
    0px 2px 2px rgba(0, 0, 0, 0.12);
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
}

.portfolio-item {
  background-color: var(--white-bg);
}

/* ---СІТКА ПЕРШИЙ СПОСІБ--- */
/* .portfolio-item {
	min-width: 370px;
	margin-right: 30px;
	margin-bottom: 30px;
}

.portfolio-item:nth-child(3n) {
	margin-right: 0;
}

.portfolio-item:nth-last-child(-n + 3) {
	margin-bottom: 0;
} */

/* ---СІТКА ДРУГИЙ СПОСІБ--- */
.portfolio-item {
  min-width: 370px;
}

.portfolio-item:not(:nth-child(3n)) {
  margin-right: 30px;
}

.portfolio-item:not(:nth-last-child(-n + 3)) {
  margin-bottom: 30px;
}

.portfolio-item:hover,
.portfolio-item:focus {
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12), 0px 4px 4px rgba(0, 0, 0, 0.06),
    1px 4px 6px rgba(0, 0, 0, 0.16);
}

.portfolio-exmpl {
  display: block;
}

.portfolio-descr {
  border: 1px solid #eeeeee;
}

.portfolio-title {
  padding-top: 20px;
  padding-left: 24px;

  font-weight: 700;
  font-size: 18px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--main-text-color);
}

.portfolio-category {
  padding-bottom: 20px;
  padding-left: 24px;

  font-size: 16px;
  line-height: 1.88;
  color: var(--secondary-text-color);
}
